﻿using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ProjetCom.Vue;

namespace ProjetCom.Ctrl
{
    abstract class CtrlTemplate
    {
        protected int m_Score = 0;
        protected Level m_Level;

        private Boolean m_ReturnMenu = false;

        public int Score
        {
            get { return m_Score; }
        }

        public Boolean ReturnMenu
        {
            get { return m_ReturnMenu; }
            protected set { m_ReturnMenu = value; }
        }
        

        public Color ColorViewBackground
        {
            get { return m_Level.ColorBackground; }
        }


        public CtrlTemplate(IServiceProvider p_serviceProvider, int p_score)
        {
            m_Score = p_score;
        }

        abstract public void Update(GameTime _gameTime);

        /// <summary>
        /// Traite les évènements clavier
        /// </summary>
        abstract public void EventClavier();

        /// <summary>
        /// Dessine le niveau
        /// </summary>
        public void Draw(SpriteBatch p_spriteBatch)
        {
            m_Level.Draw(p_spriteBatch);
        }

        public void Dispose()
        {
            m_Level.Dispose();
        }


    }
}
